import React, { Component, Dispatch } from 'react'
import { StateType } from './model';
import { connect } from 'dva';

//声明登录参数接口
interface LoginProps {
    dispatch: Dispatch<any>;
    userAndLogin: StateType;
    submitting: boolean;
}
//声明登录状态接口
interface LoginState {
    type: string;
    autoLogin: boolean;
}

//对接假数据
@connect(
    ({
        userAndLogin,
        loading,
      }: {
        userAndLogin: StateType;
        loading: {
            effects: {
                [key: string]: string;
            };
        };
      }) => ({
      userAndLogin,
      submitting: loading.effects['userAndLogin/login'],
    }),
)

class login extends Component<LoginProps, LoginState> {
  render () {
      return (
          <div>
              二货
          </div>
      );
  }
}

export default login;